<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0" />
		<title>nbclass</title>
		<link rel="stylesheet" th:href="@{/css/bootstrap.min.css}"/>
		<link rel="stylesheet" th:href="@{/iconfont/iconfont.css}"/>
		<link rel="stylesheet" th:href="@{/css/app.css}"/>
	</head>
	<body onhashchange="App.hashChange()">
		<div class="wrapper">
			<header class="main-header">
			    <a href="/" class="logo">
			      <img src="/img/logo-white.png">
			    </a>
			    <nav class="navbar navbar-static-top">
			      <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
			        <span class="sr-only">切换导航</span>
			      </a>
			      <div class="navbar-custom-menu">
	                <ul class="nav navbar-nav">
	                    <li class="dropdown">
	                        <a href="#">nbclass<i class="fa fa-caret-down ml-5"></i></a>
	                        <ul class="dropdown-menu">
	                            <li>
	                                <a href="#">个人信息</a>
	                            </li>
	                            <li>
	                                <a href="#">修改密码</a>
	                            </li>
	                            <hr>
	                            <li>
		                            <a href="#">退出系统</a>
		                        </li>
	                        </ul>
	                    </li>
	                    <li>
	                        <a href="#" data-toggle="control-sidebar"><i class="fa fa-gears"></i></a>
	                    </li>
	                </ul>
	            </div>
			    </nav>
			</header>
			<div class="main-sidebar">
				<div class="sidebar-scroll">
				    <section class="sidebar">
				      <ul class="sidebar-menu">
				      </ul>
				    </section>
			    </div>
		  	</div>
			<div class="content-wrapper">
				<div class="content-tabs">
				    <button class="roll-nav roll-left" onclick="App.scrollTabLeft()">
				        <i class="fa fa-backward"></i>
				    </button>
				    <nav class="page-tabs" id="tab-menu">
				        <div class="page-tabs-content" style="margin-left: 0px;">
				
				        </div>
				    </nav>
				    <button class="roll-nav roll-right" onclick="App.scrollTabRight()">
				        <i class="fa fa-forward" style="margin-left: 3px;"></i>
				    </button>
				    <div class="roll-nav btn-group">
				        <button class="dropdown" data-toggle="dropdown">
				            <i class="fa fa-caret-down"></i>
				        </button>
				        <ul class="dropdown-menu dropdown-menu-right">
				            <li><a class="tabReload" href="javascript:App.refreshTab();">刷新当前</a></li>
				            <li><a class="tabCloseCurrent" href="javascript:App.closeCurrentTab();">关闭当前</a></li>
				            <li><a class="tabCloseAll" href="javascript:App.closeOtherTabs(true);">全部关闭</a></li>
				            <li><a class="tabCloseOther" href="javascript:App.closeOtherTabs();">除此之外全部关闭</a></li>
				        </ul>
				    </div>
				</div>
				<div class="content-iframe">
				    <div class="tab-content " id="tab-content">
				    </div>
				</div>
			</div>
		</div>
		<script th:src="@{/js/jquery.min.js}"></script>
		<script th:src="@{/js/bootstrap.min.js}"></script>
		<script th:src="@{/js/app.js}"></script>
		<script>
			$(function(){
				//初始化系统
				App.init({prefix:"/admin/"});
				//初始化菜单
				var menus = [
		            {
				    id: '9000',
				    name: "首页",
	                icon: "ri-home-3-line",
				    url: 'welcome',
					},{
		                id: "9001",
		                name: "文章管理",
		                icon: "ri-stack-line",
		                children: [
		                	{
		                		id: "900101",
		                        name: "发布文章",
		                        url: "article/add"
		                	},{
		                        id: "900102",
		                        name: "文章列表",
		                        url: "articles"
		                    },{
		                        id: "900103",
		                        name: "栏目管理",
		                        url: "categories"
		                    },{
		                        id: "900104",
		                        name: "标签管理",
		                        url: "tags"
		                    }
		                ]
		            },
		            {
		                id: "9002",
		                name: "网站管理",
		                icon: "ri-flag-line",
		                children: [
		                    {
		                        id: "900201",
		                        name: "网站信息",
		                        url: "site/info"
		                    },{
		                        id: "900202",
		                        name: "主题管理",
		                        url: "themes"
		                    },{
								id: "900203",
								name: "友链管理",
								url: "links"
							},{
								id: "900204",
								name: "网站公告",
								url: "notifies"
							},{
								id: "900204",
								name: "轮播管理",
								url: "sliders"
							}
		                ]
		            },
					{
						id: '9003',
						name: "评论管理",
						icon: "ri-message-2-line",
						url: 'comments',
					},
		            {
		                id: "9004",
		                name: "系统管理",
		                icon: "ri-settings-3-line",
		                children: [
	                        {
		                        id: "900401",
		                        name: "用户管理",
		                        url: "users"
		                    },{
								id: "900402",
								name: "存储配置",
								url: "storage"
							}
                        ]
		            }
		        ];
				App.menuTree('.sidebar-menu',{data:menus,prefix:"/admin/"});
				//创建一个首页tab
				App.addTabs({
				    id: '9000',
				    title: '首页',
				    close: false,
				    url: 'welcome',
				    hashChange:false,
				});
				//处理第一次进入刷新
				App.activeLocationHref(true);
			})
		</script>
	</body>
</html>
